<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 1.先引入vue文件 -->
    <script src="./vue.js"></script>
    <style>
        .box{
            width: 100px;
            height: 100px;
            background-color: aquamarine;
        }
    </style>
</head>
<body>
    <!-- 2.进行挂载 -->
    <div id="app">
        <div>num:{{ num }}</div>
        <div :class="classname"></div>
        <button @click="fn(11)">点击</button>
    </div>
</body>
    <script>
        // 3.实例化对象
        new Vue ({
            el:"#app",
            data:{
                num:10,
                classname:"box"
            },
            methods:{
                fn(b){
                    this.num=b;
    
                }
            }
        })
    </script>
</html>